Broadcast Notifications
POST /api/v1/notifications/broadcast
Description
This endpoint broadcasts notifications to users via in-app messages. You can use it to send out important notifications that appear in the app for a selected group of users.
URL Parameters:
- None
Headers:
tenantId(required): The tenant ID under which the notification is being sent. This identifies the tenant environment and should be included in the header.
Request Body:
Media Type: application/json
Example Value
{
"time": "2024-09-23T10:00:00Z",
"tag": "promo_notification",
"notification": {
"type": "IN_APP",
"subject": "Special Offer!",
"message": "Don't miss our exclusive offer available today only.",
"userId": "abc123",
"tag": "PROMO",
"image": "https://example.com/promo-image.png",
"link": "https://example.com/offers",
"actions": [
{
"action": "OPEN_URL",
"title": "Shop Now",
"url": "https://example.com/shop"
}
],
"template": {
"payload": {
"key": "value",
"anotherKey": "anotherValue"
},
"templateName": "PromoTemplate"
}
}
}